<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript">
  function page(n,s){
    $("#pageNo").val(n);
    $("#pageSize").val(s);
    $("#searchForm").submit();
    return false;
  }
  //确认按钮
  function acctConfirm(){
    $.ajax({
       type:'post',
       url:'${ctx}/finance/outpAcctMaster/clinicAcctCon',
       data:$('#patientInfo').serialize(),
       success:function (data){
         if(data.code=='success'){
           toastr.success("结账成功");
           loadDiv('mainCenterDiv','${ctx}/finance/outpAcctMaster/registAcct');
           return;
         }
       }
    });
  }
</script>
<div class="app bg-default">
  <section class="layout">
    <div class="content-wrap">
      <div class="row" id="topDivId">
        <div class="col-lg-12">
          <section class="panel">
            <div class="panel-body">
              <form class="form-inline" id="patientInfo" onsubmit="return loadDivForm('content','patientInfo','${ctx}/finance/outpAcctMaster/registAcctInfo');" method="post" >
                <label>日期 ：</label>
                <c:choose>
                  <c:when test="${startTime!=null && startTime!=''}">
                    <input name="startTime" value="${startTime}"  id="startTime"  class="form-control Wdate" readonly="true"/>
                  </c:when>
                  <c:otherwise>
                    <input name="startTime" value="${startTime}"  id="startTime"  class="form-control Wdate" readonly="true" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                  </c:otherwise>
                </c:choose>
                &nbsp;至<input name="endTime" value="${endTime}" id="endTime"  class="form-control Wdate" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
                <label>结账序号:</label><input name="acctNo" value="${maxAcctNo}" id="acctNo" class="form-control"  readonly="true" />&nbsp;&nbsp;
                &nbsp;&nbsp;<input  class="btn btn-success" type="submit" value="结账累计"/>
                &nbsp;&nbsp;<input  class="btn btn-primary" type="submit" value="结账确认" onclick="acctConfirm();"/>
              </form>
            </div>
          </section>
        </div>
      </div>
      <div id="content" >
        <jsp:include page="clinicAcctInfo.jsp"></jsp:include>
      </div>
    </div>
  </section>
</div>
</div>
</div>